import api from "@/util/api";

const experimentReportsApi = {
    findAll(pageNum, size, params = {}) {
        return api
            .get("/experimentReports", {
                //发送请求
                params: {
                    pageNum,
                    size,
                    ...params,
                },
            })
            .then((resp) => resp.data);
    },
    removeAll(ids) {
        return api.delete("/experimentReports", { data: ids }).then((resp) => resp.data);
    },
    save(experimentReports) {
        return api.post("/experimentReports", experimentReports).then((resp) => resp.data);
    },
    update(experimentReports) {
        return api.put("/experimentReports", experimentReports).then((resp) => resp.data);
    },
    getReportDetail(id) {
        return api.get(`/experimentReports/${id}`).then((resp) => resp.data);
    },
};

export default experimentReportsApi;
